<template>
    <div id="app">
        <router-view></router-view>
    </div>
</template>

<script>
    import {login} from './services/login'

    export default {
        name: 'app',
        created() {
            this.renderData();
        },
        mounted() {
            this.rem()
        },
        methods: {

            // 判断是否已登陆
            renderData() {
                this.$wx.wxConfigInfo.call(this);
                // this.$tools.setStorageParam('localStorage', 'longitude', 106.57)
                // this.$tools.setStorageParam('localStorage', 'dimensionality', 29.55)
            },
            rem() {
                (function (win, doc) {
                    // 设计稿宽度750px，浏览器iphone8宽度是375px，1rem=100px，所以设置基数为 2*100
                    function change() {
                        doc.documentElement.style.fontSize = doc.documentElement.clientWidth / 375 * 37.5 + 'px'
                    }

                    change()
                    win.addEventListener('resize', change, false)
                    win.addEventListener('orientationchange', change, false) // 横纵向旋转
                })(window, document)
            }
        }
    }
</script>

<style lang="less">
    @import '~vux/src/styles/reset.less';
    @import "../static/css/common.css";

    body {
        height: 100%;
    }

    .weui-loading_toast {
        .weui-toast {
            width: 5rem !important;
            min-height: 3.6rem !important;
            background: rgba(86, 76, 76, 0.7) !important;
        }
    }

    .weui-dialog__hd {
        padding: 0rem !important;
    }

    /*暂无数据*/
    .noData {
        position: relative;
        height: 230px;
        background: url('../static/images/no_data.png') no-repeat center;
    }
</style>
